interface Meta {
  id?: number;
  icon?: string;
  hidden?: boolean;
  parent?: any;
}

interface RouteType {
  name: string,
  path: string,
  page: string,
  children?: Array<RouteType>,
  meta?: Meta
}
// 需要显示的路由菜单
const extendRoutes: Array<RouteType> = [
  {
    name: '概览',
    path: 'Overview',
    page: 'common/Overview',
    meta: {
      icon: 'send',
      hidden: true,
    },
  },
  {
    name: '发布任务',
    path: 'ReleaseTask',
    page: 'task/ReleaseTask',
    meta: {
      icon: 'send',
      hidden: false,
    },
  },
  {
    name: '跟踪任务',
    path: 'TraceTask',
    page: 'task/TraceTask',
    meta: {
      icon: 'swap_calls',
      hidden: false,
    },
  },
  {
    name: '订单列表',
    path: 'OrderManage',
    page: 'task/OrderManage',
    meta: {
      icon: 'assignment',
      hidden: false,
    },
  },
  {
    name: '订单详情',
    path: 'OrderDetail',
    page: 'task/OrderDetail',
    meta: {
      icon: 'assignment',
      hidden: true,
    },
  },
  {
    name: '店铺管理',
    path: 'ShopManage',
    page: 'task/ShopManage',
    meta: {
      icon: 'house',
      hidden: false,
    },
  },
  {
    name: '添加店铺',
    path: 'AddShop',
    page: 'task/AddShop',
    meta: {
      icon: 'house',
      hidden: true,
    },
  },
  {
    name: '充值',
    path: 'Topup',
    page: 'financial/Topup',
    meta: {
      icon: 'credit_card',
      hidden: false,
    },
  },
  {
    name: '我的账单',
    path: 'MyBill',
    page: 'financial/MyBill',
    meta: {
      icon: 'subtitles',
      hidden: false,
    },
  },
  {
    name: '提现管理',
    path: 'WithdrawManage',
    page: 'financial/WithdrawManage',
    meta: {
      icon: 'attach_money',
      hidden: false,
    },
  },
  {
    name: '提现账号管理',
    path: 'WithdrawAccount',
    page: 'financial/WithdrawAccount',
    meta: {
      icon: 'account_box',
      hidden: false,
    },
  },
  {
    name: '新增账号',
    path: 'AddAccount',
    page: 'financial/AddAccount',
    meta: {
      hidden: true,
    },
  },
];

const fullRoutes: Array<RouteType> = [{
  name: '首页',
  path: '/Home',
  page: 'Home',
  children: extendRoutes
}];


export {
  extendRoutes,
  fullRoutes,
  RouteType,
}

